package ReaderAndWriter;

import java.io.*;

public class ConversionStreamDemo {
    public static void main(String[] args) throws IOException {
        // 字符输出流
        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("funCode\\fox.txt")
        ,"GBK");

        osw.write("中国");

        InputStreamReader isr = new InputStreamReader(new FileInputStream("funCode\\fox.txt")
        ,"GBK");



        isr.close();
        osw.close();

    }
}
